{include file="common/header" /}
<script type="text/javascript" src="__PLUGINS__ueditor1.4.3.3/third-party/SyntaxHighlighter/shCore.js?v={$site_version}"></script>
<link rel="stylesheet" href="__PLUGINS__ueditor1.4.3.3/third-party/SyntaxHighlighter/shCoreDefault.css?v={$site_version}">
<script type="text/javascript">
    SyntaxHighlighter.all();
</script>
<div class="main layui-clear">
  <div class="wrap">
    <div class="content detail">
      <div class="fly-panel detail-box">
        <h1>{$data.title}</h1>
        <div class="fly-tip fly-detail-hint" data-id="{$data.id}">
          {eq name="data.top" value="1"}<span class="fly-tip-stick" style="margin-right:2px;">置顶</span>{/eq}
          {eq name="data.elite" value="1"}<span class="fly-tip-jing">精帖</span>{/eq}
          {eq name="data.accept" value="0"} <span>未结贴</span>{/eq}
          {eq name="data.accept" value="1"} <span class="fly-tip-jie">已采纳</span>{/eq}
          {in name="Think.session.userinfo.gid" value="1,2"}
          <span class="jie-admin" type="del" style="margin-left: 1px;">删除</span>
          {eq name="data.top" value="0"}<span class="jie-admin" type="set" field="top" rank="1">置顶</span> {/eq}
          {eq name="data.top" value="1"}<span class="jie-admin" type="set" field="top" rank="0" style="background-color:#ccc;margin-left: 1px;margin-right: 5px;">取消置顶</span>{/eq}
          {eq name="data.elite" value="0"}<span class="jie-admin" type="set" field="elite" rank="1">加精</span>{/eq}
          {eq name="data.elite" value="1"}<span class="jie-admin" type="set" field="elite" rank="0" style="background-color:#ccc;margin-left: 5px;">取消加精</span>             {/eq}
          {/in}
          <div class="fly-list-hint">
            <i class="iconfont" title="回答">&#xe60c;</i> {$data.reply}
            <i class="iconfont" title="人气">&#xe60b;</i> {$data.view}
          </div>
        </div>
        <div class="detail-about">
          <a class="jie-user" href="{:url('index/user/home',['uid'=>$data.uid])}">
            <img src="{$data.avatar}" alt="{$data.username}">
            <cite>
              {$data.username}
              <em>{$data.add_time|wordTime}发布</em>
            </cite>
          </a>
          <div class="detail-hits" id="LAY_jieAdmin" data-id="{$data.id}">
            <span style="color:#FF7200">悬赏：{$data.experience} 金币</span>
            {notempty name="user"}
            {eq name="user.id" value="$data.uid"}
            {eq name="data.accept" value="0"}
            <span class="layui-btn layui-btn-mini jie-admin" type="edit"><a href="{:url('index/forum/edit',['tid'=>$data.id])}">编辑此贴</a></span>{/eq}
            {/eq}
            {/notempty}
           <!-- <span class="layui-btn layui-btn-mini jie-admin " type="collect" data-type="add">收藏</span>-->
            <!--<span class="layui-btn layui-btn-mini jie-admin  layui-btn-danger" type="collect" data-type="add">取消收藏</span>-->
          </div>
        </div>
        <div class="detail-body photos" style="margin-bottom: 20px;">
          {$data.content}
        </div>
      </div>

      <div class="fly-panel detail-box" style="padding-top: 0;">
        <a name="comment"></a>
        <ul class="jieda photos" id="jieda">
          {notempty name="reply"}
          {volist name="reply" id="rp"}
          <li data-id="{$rp.id}">
            <a name="item-{$rp.time}"></a>
            <div class="detail-about detail-about-reply">
              <a class="jie-user" href="{:url('index/user/home',['uid'=>$rp.uid])}">
                <img src="{$rp.avatar}" alt="{$rp.username}">
                <cite>
                  <i>{$rp.username}</i>
                  {eq name="rp.lock" value="1"}
                    {eq name="rp.owner" value="1"}
                    <em style="color:#5FB878">（楼主）</em>
                      {eq name="Think.session.userinfo.gid" value="1,2"}
                      <em style="color:#FF9E3F">（{$rp.level|getLevel}）</em>
                      {/eq}
                    {else/}
                      <em style="color:#FF9E3F">（{$rp.level|getLevel}）</em>
                    <!-- <em style="color:#5FB878">(管理员)</em>-->
                    {/eq}
                  {else /}
                    <em style="color:#999">（该号已被封）</em>
                  {/eq}
                  <!-- <em>(楼主)</em>
                  <em style="color:#5FB878">(管理员)</em>
                  <em style="color:#FF9E3F">（活雷锋）</em>
                  <em style="color:#999">（该号已被封）</em> -->
                </cite>
              </a>
              <div class="detail-hits">
                <span>{$rp.reply_time|wordTime}</span>
              </div>
              {eq name="rp.best" value="1"} <i class="iconfont icon-caina" title="最佳答案"></i>{/eq}
            </div>
            <div class="detail-body jieda-body">
              {$rp.content}
            </div>
            <div class="jieda-reply">
              <span class='jieda-zan {eq name="rp.css_zan" value="1"}zanok{/eq}' type="zan"><i class="iconfont icon-zan"></i><em>{$rp.zan}</em></span>
              <span type="reply"><i class="iconfont icon-svgmoban53"></i>回复</span>
              {notempty name="user.id"}
              <div class="jieda-admin">
                {gt name="Think.session.userinfo.gid" value="1"}
                {eq name="rp.best" value="0"}
                <span type="edit">编辑</span><span type="del">删除</span>
                {/eq}
                {/gt}
                {neq name="data.uid" value="$rp.uid"}
                {eq name="user.id" value="$data.uid"}
                {eq name="rp.best" value="0"}<span class="jieda-accept" type="accept">采纳</span>{/eq}
                {/eq}
                {/neq}
              </div>
              {/notempty}
            </div>
            <!--<div class="jieda-reply">
              <span class="jieda-zan zanok" type="zan"><i class="iconfont icon-zan"></i><em>12</em></span>
              <span type="reply"><i class="iconfont icon-svgmoban53"></i>回复</span>
               <div class="jieda-admin">
                <span type="edit">编辑</span>
                <span type="del">删除</span>
                <span class="jieda-accept" type="accept">采纳</span>
              </div>
            </div>-->
          </li>
          {/volist}
          {else /}
           <li class="fly-none">没有任何回答</li>
          {/notempty}
        </ul>

        <div class="layui-form layui-form-pane">
          <form action="{:url('index/forum/reply')}" method="post">
            <div class="layui-form-item layui-form-text">
              <div class="layui-input-block">
                <!-- 加载编辑器的容器 -->
                <script id="L_content" name="content" type="text/plain"></script>
              </div>
            </div>
            <div class="layui-form-item">
              <input type="hidden" name="tid" value="{$data.id}">
              <button class="layui-btn" lay-filter="*" lay-submit>提交回答</button>
            </div>
          </form>
        </div>
      </div>
    </div>
  </div>

  <div class="edge">
    <!--<dl class="fly-panel fly-list-one">
      <dt class="fly-panel-title">最近热帖</dt>
      <dd>
        <a href="">使用 layui 秒搭后台大布局（基本结构）</a>
        <span><i class="iconfont">&#xe60b;</i> 6087</span>
      </dd>
      <dd>
        <a href="">Java实现LayIM后端的核心代码</a>
        <span><i class="iconfont">&#xe60b;</i> 767</span>
      </dd>
      <dd>
        <a href="">使用 layui 秒搭后台大布局（基本结构）</a>
        <span><i class="iconfont">&#xe60b;</i> 6087</span>
      </dd>
      <dd>
        <a href="">Java实现LayIM后端的核心代码</a>
        <span><i class="iconfont">&#xe60b;</i> 767</span>
      </dd>
      <dd>
        <a href="">使用 layui 秒搭后台大布局（基本结构）</a>
        <span><i class="iconfont">&#xe60b;</i> 6087</span>
      </dd>
      <dd>
        <a href="">Java实现LayIM后端的核心代码</a>
        <span><i class="iconfont">&#xe60b;</i> 767</span>
      </dd>
      <dd>
        <a href="">使用 layui 秒搭后台大布局（基本结构）</a>
        <span><i class="iconfont">&#xe60b;</i> 6087</span>
      </dd>
      <dd>
        <a href="">Java实现LayIM后端的核心代码</a>
        <span><i class="iconfont">&#xe60b;</i> 767</span>
      </dd>
    </dl>-->

    <dl class="fly-panel fly-list-one">
      <dt class="fly-panel-title">近期热议</dt>
      {volist name="nearList" id="vo"}
      <dd>
        <a href="{:url('index/forum/detail',['tid'=>$vo.id])}">{$vo.title}</a>
        <span><i class="iconfont">&#xe60c;</i> {$vo.view}</span>
      </dd>
      {/volist}
    </dl>
  </div>
</div>
<!-- 配置文件 -->
<script type="text/javascript" src="__PLUGINS__ueditor1.4.3.3/ueditor.config.js?v={$site_version}"></script>
<!-- 编辑器源码文件 -->
<script type="text/javascript" src="__PLUGINS__ueditor1.4.3.3/ueditor.all.js?v={$site_version}"></script>
<!-- 实例化编辑器 -->
<script type="text/javascript">
    //var ue = UE.getEditor('container');
    var editor = new baidu.editor.ui.Editor({
        toolbars:[['source','emotion', 'bold','simpleupload','link','insertcode', 'undo', 'redo']]
        ,initialFrameHeight:140
    });
    editor.render("L_content");
</script>
{include file="common/footer" /}